package com.mymvpproject.base;

/**
 * Created by 1 on 2017/5/16.
 */

public class User {
    private String username;
    private String password;

    public User() {

    }

    private User(Builder builder) {
        setUsername(builder.username);
        setPassword(builder.password);
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public static final class Builder {
        private String username;
        private String password;

        public Builder() {
        }

        public Builder username(String val) {
            username = val;
            return this;
        }

        public Builder password(String val) {
            password = val;
            return this;
        }

        public User build() {
            return new User(this);
        }
    }
}
